package it.gma.torero.parsing.token;

import it.gma.torero.operand.Operand;
import it.gma.torero.parsing.Tokenizer.MalformedException;
import it.gma.torero.parsing.Tokenizer.ReturnType;

public abstract class Token {

	

	public enum Type {
		OPERATOR, CONSTANT, VARIABLE, GROUP
	}

	private String sequence;

	public Token(String sequence) {
		super();
		this.sequence = sequence;
	}

	public String getSequence() {
		return sequence;
	}

	@Override
	public String toString() {
		return sequence;
	}

	public abstract Token.Type getType();

	public abstract ReturnType getReturnType() throws MalformedException;

	public abstract Operand asOperand() throws MalformedException;

}